package top.wlink.bzgrowup.bzex;


import android.app.Application;
import android.widget.Toast;

/*
 * Created by blaczom@qq.com on 2017/6/4.
 */

public class MyApp extends Application {
    public static final String TAG = "MyApp";
    private static MyApp singleton;

    @Override
    public void onCreate() {
        super.onCreate();
        singleton = this;
    }

    public static MyApp getInstance(){
        return singleton;
    }

    public void Toast(String aMsg) {
        Toast.makeText( getApplicationContext() , aMsg, Toast.LENGTH_SHORT ).show();
    }

}






/*
SharedPreferences.Editor editor=getSharedPreferences("data", MODE_PRIVATE).edit();
editor.putString("name", "Tom");
editor.putInt("age", 28);
editor.putBoolean("married", false);
editor.apply();

SharedPreferences pref = getSharedPreferences("data", MODE_PRIVATE);
String name = pref.getString("name", "");
int age = pref.getInt("age", 0);
boolean married = pref.getBoolean("married", false);


 */